/*
 * Node.h
 * This is a nod in the queue.
 * This node is also used in MemoryManager.
 * @author Hani shubin
 */
#ifndef NODE_H_
#define NODE_H_

#include <stdlib.h>
/**
 * Define bool, true, false
 */
#ifndef bool
typedef unsigned char bool;
#endif
#ifndef true
#define true 1
#endif
#ifndef false
#define false 0
#endif


/**
 * A node in the queue.
 * Contains: value- the value that was inserted to the queue by the user
 * 			 next- pointer to the next node un the queue
 * 			 enqTid- the tid of the thread that is trying to enqueue this node
 * 			 deqTid- the tid of the thread that is trying to dequeue this node
 */
typedef struct Node_t {
	int value;
	struct Node_t* next;
	long enqTid;
	long deqTid;
} Node;

#define NUM_BYTES_IN_CACHE_LINE (64)

#endif /* NODE_H_ */
